package hari3.latihan;

import java.io.*;
import java.util.*;


public class FindWords {

	public static void read() {
	
		try {
			File readfile = new File("src/hari3/latihan/Jimmy Neutron.txt");
			FileInputStream fis = new FileInputStream(readfile);
			FileReader fr = new FileReader(readfile);
			BufferedReader br = new BufferedReader(fr);
			BufferedInputStream bis = new BufferedInputStream(fis);
			DataInputStream dis = new DataInputStream(bis);

			int c = 0;

			String line = br.readLine();
			StringBuilder buff = new StringBuilder();

			while (dis.available() != 0) {
				buff.append( dis.readLine());
			}
			String str = buff.toString();
			
			String[] a = str.split(" "); 
			Character[] ch = new Character[str.length()];

			for (int gj = 0; gj < str.length(); gj++) {
					ch[gj] = buff.charAt(gj);
			}


			HashSet cch = new HashSet(Arrays.asList(ch)); 
			HashSet s = new HashSet(Arrays.asList(a));   


			for (Iterator i = cch.iterator(); i.hasNext();) {
				Object kar = i.next();
				int sameKar = 0;
				for (int j = 0; j <ch.length; j++) {
					if (kar == ch[j]) { 
						sameKar++;
					}
				}
				System.out.println(kar + " = " + Integer.toString(sameKar));
			}

		} catch (Exception e1) {
			System.out.println("error : " + e1);

		}
	}

	public static void main(String[] args) {
		
		read();
	}
}